/*
Script: mockup.footer.js
	page footer used in xdmockup for all pages
	- Developed by Xia Dong, <http://xdmockup.appspot.com>
	- Tested with MooTools release 1.2.4, under Firefox 3, Opera 9, Safari, Chrome and Internet Explorer 6 and 7.
	
License:
	MIT-style license.  
	
Changes:
	
	rev.1:
	- 2010-07-26
	- currently just one version.
	
Example:

    var footer = new MockupFooter(
        {
            div: 'footer'
        }
    );
    
    new MockupFooter({});
    
HTML:

    <ul class="browser">
        <li>Browser:</li>
        <li class="halfsep"></li>
        <li class="support">ie6</li>        <li class="sep">|</li>
        <li class="support">ie7</li>        <li class="sep">|</li>
        <li class="unsupport">ie8</li>        <li class="sep">|</li>
        <li class="support">ff</li>         <li class="sep">|</li>
        <li class="support">chrome</li>     <li class="sep">|</li>
        <li class="support">opera</li>      <li class="sep">|</li>
        <li class="support">safari</li>
        
        <li class="brand">xdmockup.appspot.com</li>
        <li class="brand sep">|</li>
        <li class="brand">XD</li>
    </ul>
	
*/

var Browsers = ['ie6', 'ie7', 'ie8', 'ff', 'chrome', 'opera', 'safari'];
var UnBrowsers = ['ie6', 'ie8'];

var MockupFooter = new Class({
    initialize: function(config) {
        var ul =  new Element('ul', {'class': 'browser'});
        var li1 = new Element('li', {'html': 'Browser:'});
        var li2 = new Element('li', {'class': 'halfsep'});
        
        ul.grab(li1);
        ul.grab(li2);
        
        Browsers.each(function(item, index) {
            var support = 'support';
            if (UnBrowsers.contains(item))
                support = 'unsupport';
                
            var li = new Element('li', {'class': support, 'html': item});
            ul.grab(li);
            
            if (index < Browsers.length - 1)
            {
                li = new Element('li', {'class': 'sep', 'html': '|'});
                ul.grab(li);
            }
        });
        
        var li3 = Element('li', {'class': 'brand', 'html': 'xdmockup.appspot.com'});
        var li4 = Element('li', {'class': 'brand sep', 'html': '|'});
        var li5 = Element('li', {'class': 'brand', 'html': 'XD'});
        
        ul.grab(li3);
        ul.grab(li4);
        ul.grab(li5);
        
        this.div = config.div || 'footer';
        $(this.div).grab(ul);
    }
});


